import styles from './index.module.scss'
import Link from 'next/link'
import cm from 'classnames'
import Image from '@c/image'

const Index = ({ className, isLink = true }) => {
  const stop = e => {
    e.stopPropagation()
  }
  return (
    <div className={cm(styles.down, className)} onClick={stop}>
      <p className={styles.tv}>
        <span>使用TV大屏观看，</span>
        <span>享受最佳视听体验</span>
      </p>
      {isLink ? (
        <Link href="/download?to=tv" className={styles.btn}>
          立即下载
        </Link>
      ) : (
        <div className={styles.btn}>立即下载</div>
      )}

      <div className={styles.line}></div>
      <div className={styles.phone}>
        <div className={styles.phoneText}>
          <p>扫码下载手机端</p>
          <p>移动观看更方便{'>>'}</p>
        </div>
        <Image src="/images/app_code.png" alt="二维码" />
      </div>
    </div>
  )
}

export default Index
